using UnityEngine;
using System.Collections;

public class Spawner_Trigger : MonoBehaviour {



	void OnTriggerEnter(Collider collider){
		if(collider.transform.tag=="player" 
			&& this.transform.tag!="spawner"){
			Debug.Log ("Collision with player");
			Spawner spawner = GetComponentInChildren<Spawner>();
			spawner.SetSpawn();
		}
		
	}
}
